home *** CD-ROM | disk | FTP | other *** search
/ Windows Undocumented File Formats / Windows Undocumented File Formats.img / CHAP6 / DECOMP.H < prev    next >
Text File  |  1997-07-15  |  1KB  |  39 lines

  1. /**********************************************************************
  2.  *
  3.  * PROGRAM: DECOMP.H
  4.  *
  5.  * PURPOSE: Header information for compressing/decompressing files using
  6.  * Microsoft's LZ77 derivative.
  7.  *
  8.  * Copyright 1997, Mike Wallace and Pete Davis
  9.  *
  10.  * Chapter 6, Compression Algorithm and File Formats, from Undocumented Windows
  11.  * File Formats, published by R&D Books, an imprint of Miller Freeman, Inc.
  12.  *
  13.  **********************************************************************/
  14.  
  15. typedef struct tagCOMPHEADER {
  16.     long    Magic1;
  17.     long    Magic2;
  18.     char    Is41;        /* 0x41                          */
  19.     char    FileFix;     /* Character saved for -r option */
  20.     long    DecompSize;
  21. } COMPHEADER;
  22.  
  23. /* Both of these numbers are constants */
  24. /* in the LZEXPAND Library             */
  25.  
  26. /* First magic# "SZDD" */
  27. #define MAGIC1 0x44445A53
  28.  
  29. /* Second magic# */
  30. #define MAGIC2 0x3327F088
  31.  
  32. /* Define some global variables */
  33. unsigned char FlagByte;       /* Byte at the start of each block of compressed data */
  34. unsigned char DataBytes[17];  /* Block of compressed data */
  35. int  DataCount=0,    /* Number of chars in current DataBytes[] */
  36.      FlagCount=0;    /* Number of items in FlagByte */
  37. long InfileSize=0L;  /* Size of input file */
  38.  
  39.